package com.canton.service.impl;
import com.canton.dao.entity.ClassNode;
import com.canton.dao.repository.ClassRepository;
import com.canton.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassServiceImpl implements ClassService {
    @Autowired
    private ClassRepository classRepository;


    @Override
    public ClassNode findByName(String name) {
        return classRepository.findByName(name);
    }

    @Override
    public List<ClassNode> findAll() {
        return classRepository.findAll();
    }

    @Override
    public List<ClassNode> findByNameLike(String likes) {
        return classRepository.findByNameLike(likes);
    }
}
